#ifndef i_durability_h__
#define i_durability_h__

#include "rbac_env.h"
#include <string>


class db_cache_oci;
class mem_cached;
class i_db_cache
{
public:
	i_db_cache();
	~i_db_cache();
	int		open(const std::string& conn_str,const std::string& user_name,const std::string& password);

	void	load(prbac_error	error);

	void	update(const key32& key,prbac_error	error);
	void	remove(const key32& key,prbac_error	error);
	void	insert(const key32& key,prbac_error	error);

	void	update_more(const key_vec& key_list,prbac_error	error);
	void	remove_more(const key_vec& key_list,prbac_error	error);
	void	insert_more(const key_vec& key_list,prbac_error	error);
	void	close();

	mem_cached&		cache();
private:
	db_cache_oci* impl;
};

#endif // i_durability_h__
